package com.study.designmodes.service.liabilityChain.v2;

import com.study.designmodes.service.liabilityChain.v1.PreparationList;

/**
 * 洗发过滤器
 *
 * @author yangyanbin
 * @date 2023/03/21
 * @since 20230321
 */
public class WashHairFilter implements StudyPrepareFilter {
    @Override
    public void doFilter(PreparationList preparationList, FilterChain filterChain) {
        if (preparationList.isWashHair()) {
            System.out.println("洗完头发了");
        }

        // 每个实现类需要显式地调用filterChain的doFilter方法
        filterChain.doFilter(preparationList, filterChain);
    }


}
